<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态绑定 style 三目运算符语法</title>
</head>
<body>
<div id="app">
    <h1 v-bind:style="{color: isColorDecorated? 'red' : 'yellow', textDecoration:isTextDecorated?'underline':''}">Hello,
        World!</h1>
</div>

<script type="module">

    import {createApp, ref} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            let isColorDecorated = ref(true)
            let isTextDecorated = ref(true)

            return {
                isColorDecorated,
                isTextDecorated,
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>